<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 输出100-200之间所有的质数 -->
    <!-- 质数： 是只能被自身和1整除的数  -->

    <script>
      for (var a = 100; a < 200; a++) {
        for (var b = 2, c = 1; b < a; b++) {
          if (a % b == 0) {
            c = 0;
            break;
          }
        }
        if (c == 1) {
          document.write(a + "<br>");
        }
      }
    </script>
  </body>
</html>
